﻿using System;
using IslandUnit.Providers;

namespace IslandUnit
{
    /// <summary>
    /// Provides objects to parameters of methods in mock objects.
    /// </summary>
    public class Any : IHideObjectMembers
    {
        /// <summary>
        /// Return an object of passed type.
        /// </summary>
        /// <typeparam name="T">Type of object to return.</typeparam>
        /// <returns>The object of passed type.</returns>
        public static T One<T>()
        {
            return ProviderRepository.Instance().MockProvider.MethodParameter<T>();
        }

        public static bool Bool
        {
            get { return One<bool>(); }
        }

        public static char Char
        {
            get { return One<char>(); }
        }
        
        public static decimal Decimal
        {
            get { return One<decimal>(); }
        }
        
        public static double Double
        {
            get { return One<double>(); }
        }
        
        public static float Float
        {
            get { return One<float>(); }
        }
        
        public static Guid Guid
        {
            get { return One<Guid>(); }
        }

        public static int Int
        {
            get { return One<int>(); }
        }
        
        public static long Long
        {
            get { return One<long>(); }
        }
        
        public static object Object
        {
            get { return One<object>(); }
        }
        
        public static short Short
        {
            get { return One<short>(); }
        }

        public static string String
        {
            get { return One<string>(); }
        }
    }
}
